<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>举报信箱</title>
		<meta name="keywords" content="">
		<meta name="description" content="">

		<link rel="shortcut icon" href="favicon.ico">
		<link href="/Application/Admin/View//Public/static/css/bootstrap.min.css" rel="stylesheet">
		<link href="/Application/Admin/View//Public/static/css/font-awesome.css" rel="stylesheet">
		<link href="/Application/Admin/View//Public/static/css/plugins/iCheck/custom.css" rel="stylesheet">
		<link href="/Application/Admin/View//Public/static/css/animate.css" rel="stylesheet">
		<link href="/Application/Admin/View//Public/static/css/style.css" rel="stylesheet">
		<style>
			.dropdown-menu {
				width: 70px;
				min-width: 70px;
				border-radius: 5px;
			}
			
			.dropdown-menu>li>a {
				margin: 0;
			}
			
			#ov {
				display: inline-block;
				max-height: 70px;
				overflow: hidden;
			}
			.ch{display: block;width: 300px;height: 38px;overflow: hidden;float: left;}
			.cd{display: block;float: left;color: blue!important;line-height: 38px;}
			
		</style>
	</head>

	<body class="fixed-sidebar full-height-layout gray-bg  pace-done">
		<nav class="navbar-default navbar-static-side" role="navigation">
	<div class="nav-close"><i class="fa fa-times-circle"></i></div>
	<div class="sidebar-collapse">
		<ul class="nav" id="side-menu">
			<li class="nav-header">
				<div class="dropdown profile-element">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">
						<span class="clear">
                                    <span class="block m-t-xs" style="font-size:20px;">
                                        <i class="fa fa-area-chart"></i>
                                        <strong class="font-bold">管理系统</strong>
                                    </span>
						</span>
					</a>
				</div>
				<div class="logo-element">管理系统</div>
			</li>
			<li>
				<a class="J_menuItem" href="<?php echo U('index/index');?>">
					<i class="fa fa-home"></i>
					<span class="nav-label">主页</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('member/index');?>">
					<i class="fa fa-user"></i>
					<span class="nav-label">会员管理</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('admin/index');?>">
					<i class="fa fa-users"></i>
					<span class="nav-label">后台用户</span>
				</a>

			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('list/index');?>">
					<i class="fa fa-folder"></i>
					<span class="nav-label">应用列表</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Config/index');?>">
					<i class="fa fa-cogs"></i>
					<span class="nav-label">网站配置</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('jubao/index');?>">
					<i class="fa fa-envelope-o"></i>
					<span class="nav-label">举报信箱</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('ticket/index');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">工单列表</span>
				</a>
			</li>




			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Articles/advertisement');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">广告</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Download/index');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">套餐设置</span>
				</a>
			</li>
		</ul>
	</div>
</nav>
		<div id="wrapper">
			<div id="page-wrapper" class="gray-bg dashbard-1" style="height: auto;">
				<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
	<ul class="nav navbar-top-links navbar-right">
		<li class="dropdown">
			<a href="<?php echo U('login/delcache');?>" class="dropdown-toggle count-info"><i class="fa fa-check"></i> 清除缓存</a>
		</li>
		<li class="dropdown">
			<a href="<?php echo U('login/logout');?>" class="dropdown-toggle count-info"><i class="fa fa-power-off"></i> 退出</a>
		</li>
	</ul>
</nav>
				<div class="row border-bottom">
					<div class="col-sm-12 animated fadeInRight">
						<div class="mail-box-header">
							<h2><a href="<?php echo U('jubao/index');?>">举报信箱</a></h2>
						</div>
						<div class="mail-box">
							<table class="table table-hover table-mail">
								<tbody>
									<tr>
										<th class="col-lg-1">ID</th>
										<th class="col-lg-1" style="text-align: center;">图标</th>
										<th class="col-lg-2" style="text-align: center;">应用名</th>
										<th class="col-lg-2">举报人</th>
										<th class="col-lg-1" style="text-align: center;">举报时间</th>
										<th class="col-lg-1">举报原因</th>
										<th class="col-lg-3">查看</th>
										<th class="col-lg-1">是否封禁</th>
									</tr>
								<?php if(is_array($member)): foreach($member as $k=>$v): if($k < 10): ?><tr class="unread">
											<td>
												<input type="checkbox" class="i-checks" name="chk_list" value="<?php echo ($v["id"]); ?>"><?php echo ($v["id"]); ?>
											</td>
											<td style="text-align: center;">
												<?php if($v["zxlogo"] != '' ): ?><img src="__IMG__<?php echo ($v["zxlogo"]); ?>" class="img-rounded" width="28" height="28" />
													<?php else: ?>
													<img src="../Public/icon/dafuapk.png" class="img-rounded" width="28" height="28" /><?php endif; ?>
											</td>
											<td style="text-align: center;">
												<?php echo (getappname($v["appid"])); ?> </td>
											<td>
												<a href=""><?php echo ($v["email"]); ?></a>
											</td>
											<td style="text-align: center;">
												<?php echo ($v["addtime"]); ?>
											</td>
											<td><?php echo ($v["reason"]); ?></td>
											<td>
													<span class="ch"><?php echo ($v["note"]); ?></span>
													<a href="javascript:;" class="cd">查看全部</a>
											</td>
											<?php if($v["status"] == 0): ?><td>

													<a href="<?php echo U('jubao/forbidden',array('id'=>$v['id']));?>" style="color:red;">禁用</a>|
													<a href="<?php echo U('jubao/alldel',array('id'=>$v['id']));?>" style="color:red;">删除</a>

												</td>
												<?php else: ?>
												<td>

													<a href="<?php echo U('jubao/forbidden',array('id'=>$v['id']));?>" style="color:#50AD1E;">启用</a>|
													<a href="<?php echo U('jubao/alldel',array('id'=>$v['id']));?>" style="color:red;">删除</a>
												</td><?php endif; ?>

										</tr><?php endif; endforeach; endif; ?>
								</tbody>
							</table>
							<form action="" method="post" id="form2" name="form2">
								<div style="overflow:hidden;padding:20px 12px;">
								<span>
									<input type="checkbox" class="i-checks" id="quanxuan">全选
									<button type="submit"  id ="delall" class="btn btn-primary btn37" value="批量删除">批量删除</button>
									<button type="submit" id="disable" class="btn btn-primary btn37">禁用/启用</button>
								</span>
							</form>
						<?php echo ($page); ?>
						</div>
						</div>
						</div>

					</div>
				</div>
			</div>
		</div>
		<!-- 全局js -->
		<script src="/Application/Admin/View//Public/static/js/jquery.min.js"></script>
		<script src="/Application/Admin/View//Public/static/js/bootstrap.min.js"></script>
		<!-- 自定义js -->
		<script src="/Application/Admin/View//Public/static/js/content.js"></script>
		<!-- iCheck -->
		<script src="/Application/Admin/View//Public/static/js/plugins/iCheck/icheck.min.js"></script>
	    <script>
            var s = "" ;
            var str ="";
            $(document).ready(function() {
                $('.i-checks').iCheck({
                    checkboxClass: 'icheckbox_square-green',
                    radioClass: 'iradio_square-green',
                });
                var checkAll = $('#quanxuan'); //全选的input
                var checkboxs = $('.i-checks'); //所有单选的input

                checkAll.on('ifChecked ifUnchecked', function(event) {
                    if(event.type == 'ifChecked') {
                        checkboxs.iCheck('check');

                        $("input[class='i-checks']:checked").each(function () {
                            if(true == $(this).is(':checked')){
                                str+=$(this).val()+",";
                            }
                            if(str.substr(str.length-1)== ','){
                                s = str.substr(0,str.length-1);

                            }

                        });


                    } else {
                        checkboxs.iCheck('uncheck');
                        s = "";
                    }
                });
                checkboxs.on('ifChanged', function(event){
                    var str = "";
                    if(checkboxs.filter(':checked').length == checkboxs.length) {
                        checkAll.prop('checked', 'checked');
                    } else {
                        checkAll.removeProp('checked');
                        $("input[class='i-checks']:checked").each(function () {
                            if(true == $(this).is(':checked')){
                                str+=$(this).val()+",";
                            }
                            if(str.substr(str.length-1)== ','){
                                s = str.substr(0,str.length-1);
                            }
                        });
                    }
                    checkAll.iCheck('update');
                });

            });

            //禁用
            $("#disable").click(function(){

                var input = document.createElement('input');  //创建input节点
                input.setAttribute('type', 'hidden');  //定义类型是文本输入
                input.id = "id";
                input.name = "id";
                input.value = s;
                document.getElementById('form2').appendChild(input ); //添加到form中显示
                var input = document.createElement('input');  //创建input节点
                input.setAttribute('type', 'hidden');  //定义类型是文本输入
                input.id = "type";
                input.name = "type";
                input.value = 0;
                document.getElementById('form2').appendChild(input ); //添加到form中显示
                document.form2.action="<?php echo U('jubao/forbidden');?>";
                document.form2.submit();
            });
            //删除
            $("#delall").click(function(){
                var input = document.createElement('input');  //创建input节点
                input.setAttribute('type', 'hidden');  //定义类型是文本输入
                input.id = "id";
                input.name = "id";
                input.value = s;
                document.getElementById('form2').appendChild(input ); //添加到form中显示
                document.form2.action="<?php echo U('jubao/alldel');?>";
                document.form2.submit();
            });


	
	
    	$(".cd").click(function(){
    	if($(this).prev().height()==38){
    		$(this).prev().height(100);
    		$(this).text("收缩");
    		$(this).css({
    			"height":100+"px",
    			"line-height":100+"px"
    		})
    	   }else{
    		$(this).prev().height(38);
    		$(this).text("查看全部")
    		$(this).css({
    			"height":38+"px",
    			"line-height":38+"px"
    		})
    		}
    	});

		
		
		
		</script>
	</body>

</html>